Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freebsd adding getentropy interception support #3161

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

devnexen
Copy link
Contributor

No description provided.

@devnexen devnexen force-pushed the freebsd_upd2 branch 2 times, most recently from c7fc377 to f32530f Compare November 12, 2023 22:20
@devnexen devnexen marked this pull request as ready for review November 13, 2023 06:16
@@ -0,0 +1,11 @@
//@only-target-freebsd
Copy link
Member

@RalfJung RalfJung Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this test run only on freebsd? The function seems to exist on other Unixes as well.

For macos we even have it already implemented. I guess we should add a Linux implementation. (But it's okay if you don't want to do that.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I was focusing on freebsd only. we might be able to expand it in a later PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this in #3162

let buf = this.read_pointer(buf)?;
let bufsize = this.read_target_usize(bufsize)?;

if bufsize > 256 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the magic number 256 come from? Please point to documentation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, even the Linux and macOS version seem to have the 256 limit (judging from my local man page and macOS man pages I found online). We forgot to check this in the macos version...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the magic number 256 come from? Please point to documentation.

sure will do.

@devnexen
Copy link
Contributor Author

@rustbot review

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Nov 13, 2023
@RalfJung
Copy link
Member

Looks good, thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Nov 13, 2023

📌 Commit 8fcf28f has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 13, 2023

⌛ Testing commit 8fcf28f with merge b1907ae...

@bors
Copy link
Contributor

bors commented Nov 13, 2023

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing b1907ae to master...

@bors bors merged commit b1907ae into rust-lang:master Nov 13, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants